using System.Threading.Tasks;
using JlPay.Sdk.Core;
using JlPay.Sdk.Models.Trans.Common;

namespace JlPay.Sdk.Services.Trans.Common
{
    /// <summary>
    /// 预授权完成退款服务
    /// </summary>
    public class AuthCompleteRefundService : BaseService
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="config">配置对象</param>
        public AuthCompleteRefundService(Config config) : base(config)
        {
        }

        /// <summary>
        /// 预授权完成退款接口
        /// </summary>
        /// <param name="request">预授权完成退款请求</param>
        /// <returns>预授权完成退款响应</returns>
        public async Task<AuthCompleteRefundResponse> AuthCompleteRefundAsync(AuthCompleteRefundRequest request)
        {
            return await PostAsync<AuthCompleteRefundRequest, AuthCompleteRefundResponse>(request, AuthCompleteRefundRequest.API_URL);
        }
    }
} 